// 标尺中每小格代表的宽度(根据scale的不同实时变化)
const getGridSize = (scale) => {
    if (scale <= 0.25) return 40
    if (scale <= 0.5) return 20
    if (scale <= 1) return 10
    if (scale <= 2) return 5
    if (scale <= 4) return 2
    return 1
}
const FONT_SCALE = 0.83 // 10 / 12
export const drawHorizontalRuler = (ctx,start,options)=>{
    const { scale, width, height, canvasConfigs } = options
    const { bgColor, fontColor, shadowColor, ratio, longfgColor, shortfgColor } = canvasConfigs;
    // 缩放ctx, 以简化计算
    ctx.scale(ratio, ratio)
    ctx.clearRect(0, 0, width, height)
}